<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>demo</title>
  <link rel="stylesheet" href="/dist/css/viil.css">
</head>

<body>
  <div id="player"></div>
  <!-- <script src="https://unpkg.com/flv.js@latest/dist/flv.min.js"></script> -->
  <script src="https://cdn.bootcss.com/flv.js/1.4.2/flv.min.js"></script>
  <!-- <script src="https://unpkg.com/hls.js@0.10.1/dist/hls.min.js"></script> -->
  <script src="https://cdn.bootcss.com/hls.js/0.9.1/hls.min.js"></script>
  <!-- <script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script> -->
  <script src="https://cdn.bootcss.com/dashjs/2.6.8/dash.all.min.js"></script>
  <script src="/dist/umd/viil.js"></script>
  <script>
    var player = viil('player')
    player.setup({
      // file: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4',
      // file: './vertical.mp4',
      // file: './output.flv',
      // file: 'http://livesec.mudu.tv/watch/d0qac5.flv?auth_key=1531378136-225965-0-78939c78d4ff4ab1224fdd8e8d9e26cc',
      // file: 'http://livesec.mudu.tv/watch/z6urkf.flv?auth_key=1531382585-409549-0-fce9bd80aaf1c04a03aaf9d02ee13908',
      // isLive: true,
      // image: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
      playlist: [
        // {
        //   file: 'http://vm2.dashif.org/livesim/testpic_2s/Manifest.mpd'
        // },
        // {
        //   file: 'https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd'
        // },
        {
          file: 'http://192.168.2.135/dash/abc.mpd'
        },
        // {
        //   file: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.mp4'
        // },
        // {
        //   file: './output.flv',
        //   image: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png'
        // },
        // {
        //   // 不在直播的流
        //   file: 'http://livesec.mudu.tv/watch/wzmf2z.m3u8?auth_key=1531462503-555412-0-c3dfba2dba47a08aa0d9dc9c574e505c'
        // },
        // {
        //   // file: 'http://livesec.mudu.tv/watch/d0qac5.flv?auth_key=1531378136-225965-0-78939c78d4ff4ab1224fdd8e8d9e26cc',
        //   file: 'http://livesec.mudu.tv/watch/z6urkf.m3u8?auth_key=1531382585-345620-0-ecd20221cc30ec08329513cddb14aa31',
        //   image: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png',
        //   isLive: true
        // },
      ],
      logo: {
        file: 'https://moeplayer.b0.upaiyun.com/dplayer/hikarunara.png'
      },
      width: '100%',
      height: 'auto',
      aspectratio: '16:9',
      repeat: true
    })

    // player.on('fullscreen', status => console.log('fullscreen', status))
    // player.on('play', status => console.log('play', status))
    // player.on('pause', status => console.log('pause', status))
    // player.on('buffer', status => console.log('buffer', status))
    // player.on('idle', status => console.log('idle', status))
    // player.on('loadedmetadata', status => console.log('loadedmetadata', status))
    // player.on('seek', status => console.log('seek', status))
    player.on('mute', function (status) { console.log('mute', status)})
    player.on('volume', function (status) { console.log('volume', status)})
    player.on('resize', function (status) { console.log('resize', status)})
    player.on('complete', function (status) { console.log('complete', status)})
    player.on('playlistComplete', function (status) { console.log('playlistComplete',
      status)})
    player.on('playlistItem', function (status) { console.log('playlistItem', status)})
    player.on('playlist', function (status) { console.log('playlist', status)})
    // player.play()

  </script>
</body>

</html>
